//
//  PhotoShowViewController.m
//  Travelmemory
//
//  Created by lanou3g on 16/3/31.
//  Copyright © 2016年 ABCD. All rights reserved.
//

#import "PhotoShowViewController.h"
#import "SCNavTabBarController.h"
#import "AllKindsOfTableViewController.h"
@interface PhotoShowViewController ()

@end

@implementation PhotoShowViewController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:YES];
    self.tabBarController.tabBar.hidden = YES;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"附近";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] style:UIBarButtonItemStyleDone target:self action:@selector(dismissAction)];
    
    AllKindsOfTableViewController *all = [[AllKindsOfTableViewController alloc] initWithStyle:(UITableViewStylePlain)];
    all.title = @"全部";
    
    AllKindsOfTableViewController *scenic = [[AllKindsOfTableViewController alloc] initWithStyle:(UITableViewStylePlain)];
    
    scenic.title = @"景点";
    
    AllKindsOfTableViewController *hotel = [[AllKindsOfTableViewController alloc] initWithStyle:(UITableViewStylePlain)];
    hotel.title = @"住宿";
    
    AllKindsOfTableViewController *restaurant = [[AllKindsOfTableViewController alloc] initWithStyle:(UITableViewStylePlain)];
    restaurant.title = @"餐厅";
    
    AllKindsOfTableViewController *entertain = [[AllKindsOfTableViewController alloc] initWithStyle:(UITableViewStylePlain)];
    entertain.title = @"休闲娱乐";
    
    AllKindsOfTableViewController *shopping = [[AllKindsOfTableViewController alloc] initWithStyle:(UITableViewStylePlain)];
    shopping.title = @"购物";
    
    SCNavTabBarController *navTabBarConreoller = [SCNavTabBarController new];
    
    navTabBarConreoller.subViewControllers = @[all,scenic,hotel,restaurant,entertain,shopping];
    
    //navTabBarConreoller.showArrowButton = NO;
    
    navTabBarConreoller.scrollAnimation = YES;
    
    // 动画效果(左右)
    navTabBarConreoller.mainViewBounces = YES;
    
    navTabBarConreoller.navTabBarColor = [UIColor whiteColor];
    
    [navTabBarConreoller addParentController:self];
    
    navTabBarConreoller.view.frame=CGRectMake(0, 0, navTabBarConreoller.view.frame.size.width, navTabBarConreoller.view.frame.size.height);

    
}

#pragma mark - dismiss
- (void)dismissAction {
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:YES];
    self.tabBarController.tabBar.hidden = NO;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
